package a.f.d;

import a.c.bb;
import a.c.e;
import a.c.k;
import a.c.m;
import a.c.x;
import a.f.o;
import a.i.db;

public abstract class f
  implements u
{
  protected double f = 20.0D;
  protected double g = 60.0D;
  protected double h = 5.0D;
  protected double i = 0.0D;
  protected x j;
  protected Object k;
  protected o l;
  protected x m;
  public static int n;
  public static int o;
  
  public void b(double paramDouble)
  {
    this.h = paramDouble;
  }
  
  public void c(double paramDouble)
  {
    this.i = paramDouble;
  }
  
  public double a()
  {
    return this.h;
  }
  
  public double b()
  {
    return this.i;
  }
  
  public void a(double paramDouble)
  {
    this.f = paramDouble;
  }
  
  public void d(double paramDouble)
  {
    this.g = paramDouble;
  }
  
  public void a(x paramx)
  {
    this.j = paramx;
  }
  
  public double c()
  {
    return this.f;
  }
  
  public double d()
  {
    return this.g;
  }
  
  public void a(Object paramObject)
  {
    this.k = paramObject;
  }
  
  public void a(o paramo, bb[] paramArrayOfbb)
  {
    int i3 = o;
    int i2 = n;
    a.c.w[] arrayOfw = new a.c.w[paramArrayOfbb.length];
    int i1 = 0;
    if (i1 < paramArrayOfbb.length)
    {
      arrayOfw[i1] = paramArrayOfbb[i1].l();
      i1++;
    }
    for (;;)
    {
      if ((i3 != 0) || (i2 == 0))
      {
        if (i2 == 0) {
          break;
        }
        if (i3 == 0) {
          a(paramo, arrayOfw);
        }
      }
    }
  }
  
  public void a(o paramo, a.c.w[] paramArrayOfw)
  {
    int i3 = o;
    int i2 = n;
    double[] arrayOfDouble = new double[paramArrayOfw.length];
    double d1 = 0.0D;
    int i1 = 0;
    label105:
    label107:
    do
    {
      if (i1 >= paramArrayOfw.length) {
        break;
      }
      double d2 = 0.0D;
      a.c.w localw = paramArrayOfw[i1];
      localw.h();
      do
      {
        if (!localw.e()) {
          break;
        }
        d2 = Math.max(d2, paramo.t(localw.d()));
        if (i3 != 0) {
          break label107;
        }
        localw.f();
        if (i2 != 0) {
          break label105;
        }
      } while (i2 == 0);
      if (i3 == 0)
      {
        arrayOfDouble[i1] = d2;
        localw.h();
        if (!localw.e()) {
          break label200;
        }
      }
      while (i3 != 0)
      {
        d3 = (arrayOfDouble[i1] - paramo.t(localw.d())) / 2.0D;
        paramo.b(localw.d(), new a.d.w(paramo.p(localw.d()), d1 + d3));
        localw.f();
        if ((i3 == 0) && (i2 != 0)) {
          break label211;
        }
        if (i2 == 0) {
          break;
        }
      }
      double d3 = d();
      do
      {
        if (this.k != null)
        {
          k localk = paramo.c(this.k);
          if (i3 != 0) {
            break;
          }
          if (localk != null)
          {
            localw.h();
            do
            {
              do
              {
                if (!localw.e()) {
                  break label346;
                }
                e locale = localw.d();
                if (i2 != 0) {
                  break;
                }
                m localm = locale.n();
                do
                {
                  if (!localm.e()) {
                    break;
                  }
                  d3 = Math.max(d3, localk.getDouble(localm.a()));
                  localm.f();
                  if (i3 != 0) {
                    break label343;
                  }
                  if (i2 != 0) {
                    break label341;
                  }
                } while (i2 == 0);
              } while (i3 != 0);
              localw.f();
            } while (i2 == 0);
          }
        }
        d1 += arrayOfDouble[i1] + d3;
      } while (i3 != 0);
      localw.h();
      i1++;
    } while (i2 == 0);
    label200:
    label211:
    label341:
    label343:
    label346:
    return;
  }
  
  public void a(o paramo, bb[] paramArrayOfbb, k paramk)
  {
    this.l = paramo;
    a(paramArrayOfbb);
    a(paramArrayOfbb, paramk);
    e();
  }
  
  protected abstract void a(bb[] paramArrayOfbb, k paramk);
  
  public double a(e parame)
  {
    return this.l.p(parame) - g(parame);
  }
  
  public double b(e parame)
  {
    return this.l.p(parame) + this.l.s(parame) + h(parame);
  }
  
  public double c(e parame)
  {
    return this.l.q(parame) - i(parame);
  }
  
  public double d(e parame)
  {
    return this.l.q(parame) + this.l.t(parame) + j(parame);
  }
  
  public double e(e parame)
  {
    return this.l.s(parame) + g(parame) + h(parame);
  }
  
  public double f(e parame)
  {
    return this.l.t(parame) + i(parame) + j(parame);
  }
  
  public double g(e parame)
  {
    int i1 = o;
    if (i1 == 0) {
      if (this.j.get(parame) != null) {
        return 0.0D;
      }
    }
    k localk = this.l.c(u.a);
    return (i1 != 0) || (localk != null) ? localk.getDouble(parame) : 0.0D;
  }
  
  public double h(e parame)
  {
    int i1 = o;
    if (i1 == 0) {
      if (this.j.get(parame) != null) {
        return 0.0D;
      }
    }
    k localk = this.l.c(u.b);
    return (i1 != 0) || (localk != null) ? localk.getDouble(parame) : 0.0D;
  }
  
  public double i(e parame)
  {
    int i1 = o;
    if (i1 == 0) {
      if (this.j.get(parame) != null) {
        return 0.0D;
      }
    }
    k localk = this.l.c(u.c);
    return (i1 != 0) || (localk != null) ? localk.getDouble(parame) : 0.0D;
  }
  
  public double j(e parame)
  {
    int i1 = o;
    if (i1 == 0) {
      if (this.j.get(parame) != null) {
        return 0.0D;
      }
    }
    k localk = this.l.c(u.d);
    return (i1 != 0) || (localk != null) ? localk.getDouble(parame) : 0.0D;
  }
  
  public double k(e parame)
  {
    return this.l.s(parame) / 2.0D + g(parame);
  }
  
  public double l(e parame)
  {
    return this.l.s(parame) / 2.0D + h(parame);
  }
  
  public double m(e parame)
  {
    return this.l.t(parame) / 2.0D + i(parame);
  }
  
  public double n(e parame)
  {
    return this.l.t(parame) / 2.0D + j(parame);
  }
  
  protected void a(bb[] paramArrayOfbb)
  {
    int i3 = o;
    int i2 = n;
    k localk1 = this.l.c(u.b);
    k localk2 = this.l.c(u.a);
    k localk3 = this.l.c(u.e);
    if (i3 == 0)
    {
      this.m = db.a(new double[this.l.j()]);
      if (localk3 == null)
      {
        localObject1 = new z();
        ((z)localObject1).c(a());
        ((z)localObject1).a(c());
        ((z)localObject1).a(this.l, paramArrayOfbb, this.j, this.m);
        if (i3 != 0) {
          break label186;
        }
        if (i2 == 0) {
          break label185;
        }
      }
    }
    Object localObject1 = this.l.v();
    Object localObject2;
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      this.m.a(localObject2, localk3.getDouble(localObject2));
      ((a.c.w)localObject1).f();
    } while (i2 == 0);
    label185:
    label186:
    int i1 = 0;
    label353:
    label355:
    do
    {
      if (i1 >= paramArrayOfbb.length) {
        break;
      }
      localObject2 = paramArrayOfbb[i1].l();
      if ((i3 != 0) || (((a.c.w)localObject2).e()))
      {
        Object localObject3 = ((a.c.w)localObject2).d();
        ((a.c.w)localObject2).f();
        do
        {
          if (!((a.c.w)localObject2).e()) {
            break;
          }
          e locale = ((a.c.w)localObject2).d();
          double d = this.m.getDouble(localObject3);
          if (i3 != 0) {
            break label355;
          }
          if (i2 != 0) {
            break label353;
          }
          if (i3 == 0) {
            if (localk1 != null) {
              d += localk1.getDouble(localObject3);
            }
          }
          if (localk2 != null) {
            d += localk2.getDouble(locale);
          }
          this.m.a(localObject3, d);
          localObject3 = locale;
          ((a.c.w)localObject2).f();
        } while (i2 == 0);
      }
      if (i3 == 0) {
        i1++;
      }
    } while (i2 == 0);
  }
  
  protected double o(e parame)
  {
    return this.m.getDouble(parame);
  }
  
  protected void e()
  {
    this.m = null;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.d.f
 * JD-Core Version:    0.7.0.1
 */